//在utils中实现日期格式化方法（formatDate）
export const formatDate=(date)=>{
    const dateData=new Date(date)
   


     const year = dateData.getFullYear()
     const month=dateData.getMonth()+1
     const day  = dateData.getDate()
     const hour = dateData.getHours()
     const minute = dateData.getMinutes()
     const second = dateData.getSeconds()
     
     if(date){
       return `${year}-${month}-${day} ${hour}:${minute}:${second}`
     }
}